$(function() {
  var $el = $('#index-sliders');
  $el.height(global.H - 125);
  $el.superslides({
    play: 6000,
    //轮播周期
    //animation: 'fade', //效果
    animation: 'fade',
    //效果
    inherit_height_from: $el,
    pagination: false //是否显示dot分页显示
  });

  $('.loading-bg').css({
    width:global.W,
    height:global.H
  });

  $('.page-head,#index-sliders,.heng-zuopin,.container,.row,.page-foot').hide();

  var interval = null;
  function _processingLoading(){
    var val = $('.per').text();
    var val = parseInt(val);
    if(val == 99){
      clearInterval(interval);
      $('.loading-bg').fadeOut();
      $('.page-head,#index-sliders,.heng-zuopin,.container,.row,.page-foot').fadeIn(2000);
      return;
    }
    val++;
    $('.per').text(val);
    $('.img-fg').height(parseInt((val/100)*255));

  }
  interval = setInterval(_processingLoading,50);
});

